# default var
SERVER_ADDR=192.168.99.100:9003


# setting var
if [[ $1 && $1 = "-s" ]]
then
    if [ $2 ]
    then
        echo "setting server to "$2
        SERVER_ADDR=$2
    else
        echo "usage: ./build.sh -s server_host:server_port"
    fi
else
    echo "using default server: "$SERVER_ADDR
fi

# node module
npm install --registry=https://registry.npm.taobao.org
# bower components
bower install
gulp -s $SERVER_ADDR -b
